Skip to content

Conversation

@chiaramapellimt
Copy link
Contributor

@chiaramapellimt chiaramapellimt commented Oct 22, 2025

What

The goal is to validate the XML produced by the adaptor, to return a negative acknowledgement and to log the reason from the XML failure.

Why

At present, if XML is generate for the bundle this is send to the incumbent regardless of whether it is valid XML and leaves the incumbent to reject the message. Instead we should validate the XML in the adaptor and fail the transfer if the XML is not valid.

Type of change

Please delete options that are not relevant.

  • Internal change (non-breaking change with no effect on the functionality affecting end users)

Checklist:

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the Changelog with details of my change in the UNRELEASED section if this change will affect end users

@chiaramapellimt chiaramapellimt changed the title Validated XML before sending NIAD-3142 Validated XML before sending Oct 22, 2025
@chiaramapellimt chiaramapellimt force-pushed the NIAD-3142 branch 3 times, most recently from 835ecaf to abea362 Compare October 23, 2025 14:05
@chiaramapellimt chiaramapellimt marked this pull request as ready for review October 23, 2025 14:50
@chiaramapellimt chiaramapellimt requested a review from a team as a code owner October 23, 2025 14:50
@chiaramapellimt chiaramapellimt force-pushed the NIAD-3142 branch 3 times, most recently from cfa467e to 5b53429 Compare October 23, 2025 14:53
@ORybak5
Copy link
Contributor

ORybak5 commented Oct 23, 2025

  • Surviving mutants in this change: 2
  • Killed mutants in this change: 2

class surviving killed
🧟uk.nhs.adaptors.gp2gp.ehr.mapper.EhrExtractMapper 2 1
💯uk.nhs.adaptors.gp2gp.gpc.StructuredRecordMappingService 0 1
See https://pitest.org

@chiaramapellimt there seems to be two surviving mutation issues in Pitest

@MartinWheelerMT MartinWheelerMT changed the title NIAD-3142 Validated XML before sending NIAD-3142 Validate XML before sending Oct 27, 2025
@MartinWheelerMT MartinWheelerMT changed the title NIAD-3142 Validate XML before sending NIAD-3142: Validate XML before sending Oct 27, 2025
@MartinWheelerMT MartinWheelerMT enabled auto-merge (squash) October 27, 2025 14:28
@github-actions
Copy link

Looks good. All 4 mutations in this change were killed.

class surviving killed
💯uk.nhs.adaptors.gp2gp.gpc.StructuredRecordMappingService 0 1
💯uk.nhs.adaptors.gp2gp.ehr.mapper.EhrExtractMapper 0 3

See https://pitest.org

@sonarqubecloud
Copy link

@MartinWheelerMT MartinWheelerMT merged commit bee0fd5 into main Oct 27, 2025
15 checks passed
@MartinWheelerMT MartinWheelerMT deleted the NIAD-3142 branch October 27, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants